package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.hq.ims.data.entityenum.EnumFeedbackPhase;
import com.hq.ims.data.entityenum.EnumForewarningInfoClassify;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.hq.mybatis.base.BaseModel;
import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Builder;
import lombok.With;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;
import java.io.Serializable;
import com.hq.ims.data.vo.auth.BaseRowAuthVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.hq.ims.data.vo.BusInfoForewarningMapstruct;

/**
* @author 蒋柏平
* @since 20241114
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias("BusInfoForewarning")
@TableName(value = "bus_info_forewarning")
@ApiModel(value = "经营信息预警表", description = "经营信息预警表")
public class BusInfoForewarning extends BaseModel<BusInfoForewarning> implements Serializable {

    @ApiModelProperty(value = "")
    @TableId(value = "bus_info_forewarning_id",type = IdType.ASSIGN_UUID)
    private String busInfoForewarningId;

    @ApiModelProperty(value = "经营信息ID")
    @TableField(value = "busi_info_id")
    private String busiInfoId;

    @ApiModelProperty(value = "产业标记ID")
    @TableField(value = "industry_mark_id")
    private String industryMarkId;

    @ApiModelProperty(value = "产业标记名称")
    @TableField(value = "industry_mark_name")
    private String industryMarkName;

    @ApiModelProperty(value = "企业ID")
    @TableField(value = "company_id")
    private String companyId;

    @ApiModelProperty(value = "企业名称")
    @TableField(value = "company_name")
    private String companyName;

    @ApiModelProperty(value = "数据id(根据信息分类, 确定是推送id还是跟踪id)")
    @TableField(value = "data_id")
    private String dataId;

    @ApiModelProperty(value = "预警信息分类")
    @TableField(value = "forewarning_info_classify")
    private EnumForewarningInfoClassify forewarningInfoClassify;

    @ApiModelProperty(value = "反馈阶段")
    @TableField(value = "feedback_phase")
    private EnumFeedbackPhase feedbackPhase;

    @ApiModelProperty(value = "反馈时间")
    @TableField(value = "feedback_date")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime feedbackDate;

    @ApiModelProperty(value = "经营人员ID")
    @TableField(value = "busi_person_id")
    private String busiPersonId;

    @ApiModelProperty(value = "经营人员名称")
    @TableField(value = "busi_person_name")
    private String busiPersonName;

    @ApiModelProperty(value = "发送短信的用户ID")
    @TableField(value = "send_message_user_id")
    private String sendMessageUserId;

    @ApiModelProperty(value = "是否已发送短信")
    @TableField(value = "send_flag")
    private Boolean sendFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_date_time", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "创建用户名称")
    @TableField(value = "create_user_name", fill = FieldFill.INSERT)
    private String createUserName;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_date_time", fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "更新用户名称")
    @TableField(value = "update_user_name", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;

    @ApiModelProperty(value = "创建用户id")
    @TableField(value = "create_user_id", fill = FieldFill.INSERT)
    private String createUserId;

    @ApiModelProperty(value = "更新用户id")
    @TableField(value = "update_user_id", fill = FieldFill.INSERT_UPDATE)
    private String updateUserId;

    @ApiModelProperty(value = "组织机构ID")
    @TableField(value = "org_id", fill = FieldFill.INSERT)
    private String orgId;

    @ApiModelProperty(value = "乐观锁")
    @TableField(value = "version")
    @Version
    private Integer version;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "is_del")
    private Boolean isDel;

    public BusInfoForewarningMapstruct.BusInfoForewarningRowAuthVo auth(){
        BusInfoForewarningMapstruct.BusInfoForewarningRowAuthVo auth = new BusInfoForewarningMapstruct.BusInfoForewarningRowAuthVo(this);
        return auth;
    }

}
